import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class Test9 {

	public static void main(String[] args) {
		File file1 = new File(args[0]);
		FileInputStream f1 = null;
		FileOutputStream f2 = null;
		String name = args[1] + file1.getName();
		File file2 = new File(name);
		try {
			f1 = new FileInputStream(file1);
			f2 = new FileOutputStream(file2);
			byte[] a = new byte[1024];
			int length = 0;
			file2.createNewFile();
			while ((length = f1.read(a)) > 0) {
				f2.write(a);
			}

		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			try {
				if (f1 != null)
					f1.close();
				if (f2 != null)
					f2.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}

	}

}
